import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
    mode: 'history',
    routes: [
    	{
            path: '/',
            name: 'Home',
            component: resolve => require(['@/components/home/Home'], resolve),
            meta: { title: '首页' }
        },
        {
            path: '/search',
            name: 'search',
            component: resolve => require(['@/view/search/search'], resolve),
            meta: { title: '搜索' }
        },
        {
            path: '/classify',
            name: 'classify',
            component: resolve => require(['@/view/search/classify'], resolve),
            meta: { title: '分类' }
        },
        {
            path: '/classifyDetail',
            name: 'classifyResult',
            component: resolve => require(['@/view/search/classifyResult'], resolve),
            meta: { title: '分类详情' }
        },
        {
            path: '/searchResult',
            name: 'searchResult',
            component: resolve => require(['@/view/search/searchResult'], resolve),
            meta: { title: '搜索结果' }
        },
        {
            path: '/moreResult',
            name: 'morehResult',
            component: resolve => require(['@/view/search/moreResult'], resolve),
            meta: { title: '查看更多' }
        },
        {
            path: '/subBuy',
            name: 'subBuy',
            component: resolve => require(['@/view/collection/subBuy'], resolve),
            meta: { title: '提交信息' },
        },
        {
            path: '/noAddress',
            name: 'noAddress',
            component: resolve => require(['@/view/collection/noAddress'], resolve),
            meta: { title: '暂无地址' },
        },
        {
            path: '/addAddress',
            name: 'addAddress',
            component: resolve => require(['@/view/collection/addAddress'], resolve),
            meta: { title: '新增地址' },
        },
        {
            path: '/addressList',
            name: 'addressList',
            component: resolve => require(['@/view/collection/addressList'], resolve),
            meta: { title: '待选择地址列表' },
        },
        {
            path: '/paySuccess',
            name: 'paySuccess',
            component: resolve => require(['@/view/collection/paySuccess'], resolve),
            meta: { title: '支付成功' },
        },
        {
            path: '/payFail',
            name: 'payFail',
            component: resolve => require(['@/view/collection/payFail'], resolve),
            meta: { title: '支付失败' },
        },
        {
            path: '/select',
            name: 'Select',
            component: resolve => require(['@/view/collection/select'], resolve),
            meta: { title: '选择藏品' },
        },
        {
            path: '/order',
            name: 'order',
            component: resolve => require(['@/view/order/fullorder'], resolve),
            meta: { title: '订单' },
        },
        {
            path: '/orderSuccess',
            name: 'orderSuccess',
            component: resolve => require(['@/view/order/orders/orderSuccess'], resolve),
            meta: { title: '订单支付成功' },
        },
        {
            path: '/orderFail',
            name: 'porderFail',
            component: resolve => require(['@/view/order/orders/orderFail'], resolve),
            meta: { title: '订单支付失败' },
        },
        {
            path: '/bepaid',
            name: 'bepaid',
            component: resolve => require(['@/view/order/orders/bepaid'], resolve),
            meta: { title: '支付保证金订单' },
        },
        {
            path: '/send',
            name: 'send',
            component: resolve => require(['@/view/order/orders/send'], resolve),
            meta: { title: '发货订单' },
        },
        {
            path: '/mySend',
            name: 'mySend',
            component: resolve => require(['@/view/order/orders/mySend'], resolve),
            meta: { title: '我要发货' },
        },
        {
            path: '/refuseSale',
            name: 'refuseSale',
            component: resolve => require(['@/view/order/orders/refuseSale'], resolve),
            meta: { title: '拒绝售卖' },
        },
        {
            path: '/fackOf',
            name: 'fackOf',
            component: resolve => require(['@/view/order/orders/fackOf'], resolve),
            meta: { title: '关闭交易' },
        },
        {
            path: '/buyLook',
            name: 'buyLook',
            component: resolve => require(['@/view/order/orders/buyLook'], resolve),
            meta: { title: '购买订单查看详情' },
        },
        {
            path: '/epay',
            name: 'epay',
            component: resolve => require(['@/view/order/orders/epay'], resolve),
            meta: { title: '置换订单待支付' },
        },
        {
            path: '/exchangeLook',
            name: 'exchangeLook',
            component: resolve => require(['@/view/order/orders/exchangeLook'], resolve),
            meta: { title: '置换订单查看详情' },
        },
        {
            path: '/handle',
            name: 'handle',
            component: resolve => require(['@/view/order/orders/handle'], resolve),
            meta: { title: '置换订单确认操作' },
        },
        {
            path: '/exchangeSend',
            name: 'exchangeSend',
            component: resolve => require(['@/view/order/orders/exchangeSend'], resolve),
            meta: { title: '置换订单发货' },
        },
        {    
            path: '/message',
            name: 'message',
            component: resolve => require(['@/view/xianyuMy/message'], resolve),
            meta: { title: '消息通知' },
        },
        {
            path: '/userAgreement',
            name: 'userAgreement',
            component: resolve => require(['@/view/xianyuMy/userAgreement'], resolve),
            meta: { title: '用户协议' },      
        },
        {
            path: '/Guide',
            name: 'myGuide',
            component: resolve => require(['@/view/xianyuMy/myGuide'], resolve),
            meta: { title: '操作指南' },
        },{
            path:'/guideDetails',
            name:'guideDetails',
            component: resolve => require(['@/view/xianyuMy/guideDetails'], resolve),
            meta: { title: '操作指南内容' },
        },
        {
            path: '/suggestions',
            name: 'suggestions',
            component: resolve => require(['@/view/xianyuMy/suggestions'], resolve),
            meta: { title: '意见反馈' },  
        },
        {
            path: '/aboutus',
            name: 'aboutus',
            component: resolve => require(['@/view/xianyuMy/aboutus'], resolve),
            meta: { title: '关于我们' },  
        },
        {
            path: '/mycollection',
            name: 'mycollection',
            component: resolve => require(['@/view/xianyuMy/mycollection'], resolve),
            meta: { title: '我的藏品' },      
        },
        {
            path: '/myfavorites',
            name: 'myfavorites',
            component: resolve => require(['@/view/xianyuMy/myfavorites'], resolve),
            meta: { title: '我的收藏' },      
        },
        {
            path: '/myChange',
            name: 'myChange',
            component: resolve => require(['@/view/xianyuMy/myChange'], resolve),
            meta: { title: '我的置换' }, 
        },
        {
            //我的置换---支付保证金详情
            path:'/changepayBail',
            name: 'changepayBail',
            component: resolve => require(['@/view/xianyuMy/changepayBail'], resolve),
            meta: { title: '订单详情' }, 
        },
        {
            //我的置换---订单详情--我要发货/确认发货/查看订单
            path:'/mychangeDetail',
            name: 'mychangeDetail',
            component: resolve => require(['@/view/xianyuMy/mychangeDetail'], resolve),
            meta: { title: '订单详情' }, 
        },
        {
            path: '/myBuy',
            name: 'myBuy',
            component: resolve => require(['@/view/xianyuMy/myBuy'], resolve),
            meta: { title: '我的购买' }, 
        },
        {
            //我的购买、我的置换----支付成功、确认收货
            path: '/myorderSuccess',
            name: 'myordersuccess',
            component: resolve => require(['@/view/xianyuMy/paySuccess'], resolve),
            meta: { title: '支付成功' }, 
        },
        {
            //我的购买、我的置换----支付失败、申请关闭成功、
            path: '/myorderFail',
            name: 'myorderFail',
            component: resolve => require(['@/view/xianyuMy/myorderFail'], resolve),
            meta: { title: '支付失败' }, 
        },
        {
            //我的--我的购买--（买家身份）=--订单详情---支付保证金
            path: '/buyerpayBail',
            name: 'buyerpayBail',
            component: resolve => require(['@/view/xianyuMy/buyerpayBail'], resolve),
            meta: { title: '订单详情' }, 
        },
        {
            //我的--我的购买--（买家身份）=--订单详情---订单关闭
            path:'/buyerorderClose',
            name: 'buyerorderClose',
            component: resolve => require(['@/view/xianyuMy/buyerorderClose'], resolve),
            meta: { title: '订单详情' },
        },
        {
            path: '/myaddress',
            name: 'myaddress',
            component: resolve => require(['@/view/xianyuMy/myaddress'], resolve),
            meta: { title: '收货地址' },      
        },
        {
            path: '/mybalance',
            name: 'mybalance',
            component: resolve => require(['@/view/xianyuMy/mybalance'], resolve),
            meta: { title: '我的余额' }, 
        },
        {
            path: '/mycard',
            name: 'mycard',
            component: resolve => require(['@/view/xianyuMy/mycard'], resolve),
            meta: { title: '我的银行卡' }, 
        },
        {
            path: '/addcard',
            name: 'addcard',
            component: resolve => require(['@/view/xianyuMy/addcard'], resolve),
            meta: { title: '添加银行卡' }, 
        },
        {
            path: '/getcash',
            name: 'getcash',
            component: resolve => require(['@/view/xianyuMy/getcash'], resolve),
            meta: { title: '提现' },
        },
        {
            path: '/cashApply',
            name: 'cashApply',
            component: resolve => require(['@/view/xianyuMy/cashApply'], resolve),
            meta: { title: '提现申请' },
        },  
        {
            path: '/law',
            name: 'LegalNotice',
            component: resolve => require(['@/view/collection/LegalNotice'], resolve),
            meta: { title: '法律声明' },
        },  
        {
            path: '/goodsShare',
            name: 'goodsShare',
            component: resolve => require(['@/view/share/goods'], resolve),
            meta: { title: '藏品详情分享' },
        },  
        {
            path: '/appShare',
            name: 'appShare',
            component: resolve => require(['@/view/share/app'], resolve),
            meta: { title: 'app分享' },
        },  
        {
            path: '/intimity',
            name: 'intimity',
            component: resolve => require(['@/view/law'], resolve),
            meta: { title: 'app分享' },
        },  
        { path: '/404', component: resolve => require(['@/components/page/404.vue'], resolve) },
        { path: '*', redirect: '/404' }
    ]
})